x=int(input())
u=1
count=0
while (u>x):
    if x%u==0:
        count+=n
    u += 1
if count==x:
    print(x,'is perfect')
else:
    print(x,'is not perfect')
